<?php
session_start();
$data = isset($_POST['data']) ? $_POST['data'] : "";
$title = isset($_POST['title']) ? $_POST['title'] : "";
include_once ("conn.php");
$postMainTopic = new Bbs();
$result = $postMainTopic -> postMainTopic($data,$title,$_SESSION['loginUserID']);
if($result){
    $a['error'] = 0;
}
else{
    $a['error'] = 1;
}
echo json_encode($a);